<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Index</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* flex 布局, 方向 y 轴 */
        body {
            min-height: 100vh;
            display: flex;
            flex-direction: column;
        }

        /* 
            main 的 flex: 10 
            footer 的 flex: 1
            表示两个盒子的比例是 10:1
        */
        main {
            flex: 10;
            background-color: antiquewhite;
            padding: 30px;
        }

        footer {
            flex: 1;
            padding: 50px;
            background-color: rgb(48, 46, 46);
        }


        /* 弹性盒子的使用 */
        .container {
            height: 300px;
            background-color: skyblue;
            display: flex;
        }

        .container .box {
            width: 100px;
            height: 100%;
            border: 1px solid snow;
            flex: 1;
        }

        .container .box:nth-child(1) {
            flex: 2;
        }

        .container .box:nth-child(2) {
            flex: 3;
        }
    </style>
</head>

<body>
    <main>
        hello
        <!-- 弹性盒子的使用 -->
        <div class="container">
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
            <div class="box"></div>
        </div>
    </main>
    <footer></footer>


</body>

</html>